#version 420

const float PI = 3.1415926535897932;

// Input vertex data, different for all executions of this shader.
layout(location = 0) in vec3 vertexPosition_modelspace;
layout(location = 1) in vec2 vertexUV;
 
out vec2 UV;	// texture coord
 
// Values that stay constant for the whole mesh.
uniform mat4 depthMVP;
uniform float time; // time in ms
uniform float ground; // high of ground 
 
void main()
{
 	vec4 v = vec4(vertexPosition_modelspace,1);
	v.x = v.x + ((sin(time*200 * (PI/180.0))/100) + 0.05)*((v.y / ground));
	gl_Position =  depthMVP * v;
	UV = vertexUV;
}
